<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>window</title>
</head>
<body>
<button onclick="window.open()">NewPage</button>
<script>
   document.write(location.href);

</script>
</body>
</html>